package com.naiterui.ehp.bs;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.data.mongo.MongoDataAutoConfiguration;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;

import com.naiterui.common.redis.config.EnableRedisAutoConfiguration;
import com.naiterui.common.repository.config.EnableMultiMongoTemplateConfiguration;
import com.naiterui.common.repository.core.BaseJpaRespositoryImpl;

@EnableWebMvc
@EnableFeignClients
@EnableAspectJAutoProxy(exposeProxy = true, proxyTargetClass = true)
@EnableAsync
@ComponentScan("com.naiterui")
@EntityScan("com.naiterui")
@EnableRedisAutoConfiguration
@EnableMultiMongoTemplateConfiguration
@EnableJpaRepositories(basePackages = {"com.naiterui.ehp.bs.*.repository"}, repositoryBaseClass = BaseJpaRespositoryImpl.class)
@SpringBootApplication(exclude = {MongoAutoConfiguration.class, MongoDataAutoConfiguration.class})
public class UserServer {

    public static void main(String[] args) {
        SpringApplication.run(UserServer.class, args);
    }

}
